*Table 3. Comparison foreign policy among government’s terms

gen cardoso=1 if year<2004
replace cardoso=0 if cardoso==.

************************************************
*First line: "Cardoso (2nd term) vs Lula and Rousseff"

**[columns 1 and 2]
ttest fpi if global_south==0, by(cardoso)
di (.089-.094)/ .089 *100
*-5.6%; t-test of 0.55

**[columns 3 and 4]
ttest fpi if global_south==1, by(cardoso)
di (.092-.17)/.092*100
*-85%; t-test of 9.27

drop cardoso

************************************************
*Second line: "Cardoso (2nd term) vs Lula (two terms)"

gen cardoso2=1 if year<2004
replace cardoso2=0 if cardoso2==. & year<2010

**[columns 1 and 2]
ttest fpi if global_south==0, by(cardoso2)
 di ( .089-.093)/.089*100
*-4.4%; t-test of 0.36

**[columns 3 and 4]
ttest fpi if global_south==1, by(cardoso2)
di ( .092-.155)/.092*100
*-69%; t-test of 7.17

drop cardoso2

************************************************
*Third line: "Cardoso (2nd term) vs Lula (first term)"
gen cardoso3=1 if year<2004
replace cardoso3=0 if cardoso3==. & year<2007

**[columns 1 and 2]
ttest fpi if global_south==0, by(cardoso3)
di (.089 -.087)/.089*100
*2.2%; t-test of 0.14

**[columns 3 and 4]
ttest fpi if global_south==1, by(cardoso3)
di (.092 -.140)/ .092*100
*-52.2%; t-test of 4.74

drop cardoso3

************************************************
*Fourth line: "Rousseff vs Lula (two terms) and Cardoso (2nd term)" 

**[columns 1 and 2]
ttest fpi if global_south==0, by(dilma)
di (.0843-.0950)/ .0843*100
*-12.7%; t-test of 1.21

**[columns 3 and 4]
ttest fpi if global_south==1, by(dilma)
di(.176-.131)/.176*100
*25.5%; t-test of 4.61


************************************************
*Fifth line: "Rousseff vs Lula (two terms)" 

gen dilma2=1 if year>2010
replace dilma2=0 if year <2011 & year>2002

**[columns 1 and 2]
ttest fpi if global_south==0, by(dilma2)
di(. 08433- .0981)/ .08433*100
*16.3%; t-test of 1.63

**[columns 3 and 4]
ttest fpi if global_south==1, by(dilma2)
di(.1760-.1594)/.1760*100
*9.4%; t-test of 1.49


************************************************
*Sixth line: "Rousseff vs Lula (last term)"

gen dilma3=1 if year>2010
replace dilma3=0 if year<2011 & year>2007

**[columns 1 and 2]
ttest fpi if global_south==0, by(dilma3)
di (.0843- .1124)/ .0843*100
*-33%; t-test of 3.08

**[columns 3 and 4]
ttest fpi if global_south==1, by(dilma3)
di (.1760-.1921)/.1760*100
*-9.14%; t-test of 1.13
